<template>
	<view>
		<scroll-view scroll-y class="page">
			<view class="padding text-center title">发布分类</view>
			<form>
				<view class="cu-form-group">
					<view class="title">分类名称</view>
					<input placeholder="请输入分类名称" name="input" v-model="cate.name"></input>
				</view>
			</form>
			<view class="padding flex flex-direction">
				<button class="cu-btn bg-red margin-tb-sm lg" @click="pubCate()">发布</button>
			</view>
			<view class="cu-tabbar-height"></view>
		</scroll-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cate: {}
			}
		},
		methods: {
			pubCate(){
				this.$apis.saveCategory(this.cate).then((res) => {
					uni.navigateTo({
						url: '/pages/store/index?id=' + this.storeId
					})
				})
			}
		}
	}
</script>

<style>

</style>
